﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.OleDb;

public partial class RiskItemMaster : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string chapterNo = "";
        if (0 == Request.QueryString["ChapterNo"].Length)
        {
            //如果没有传入参数，就不继续执行。
            return;
        }
        chapterNo = Request.QueryString["ChapterNo"].ToString();
        //开始读取详细信息
        DBOperate myDB = new DBOperate();
        myDB.SetCommandString(string.Format("select * from ChapterList where [No] = {0}",chapterNo));
        OleDbDataReader dbReader = myDB.ExecuteReader();
        if (dbReader.Read())
        {
            //若存在此数据则将位置显示出来
            LBLoc.Text = string.Format(@"当前位置：
                                         <a href='GetRiskItem.aspx?ChapterNo={0}'>{1} {2}</a>",
                                        chapterNo,
                                        dbReader["CNo"] != DBNull.Value ? "ATA "+ dbReader["CNo"].ToString() + "-":"",
                                        dbReader["CName"].ToString());
        }
        else
        {
            LBLoc.Text = "";
        }

        dbReader.Close();
        myDB.CloseDB();

    }
}
